OtpFieldStyle

Visual style of an OtpField.

cellWidth and cellHeight are minimum sizes: cells grow with the system font scale. Sizes below 48dp are raised to 48dp. focusedBorderWidth must be larger than borderWidth so focus and error are never communicated by color alone. groupSize draws a decorative separator between groups of digits (for example 3 gives "123 - 456") without changing the code. Separators are drawn only when the code length splits into equal groups, so 3 groups a 6-digit code but leaves 4- and 8-digit codes ungrouped. placeholder is drawn in empty cells. errorTextStyle styles the visible error message (sp, so it follows font scale). liftFocusedCell raises the focused cell slightly with a shadow, in addition to its thicker border; with "Remove animations" on, it moves without animation. colors null (the default) follows the system light or dark theme; pass OtpFieldDefaults.colors or OtpFieldDefaults.darkColors to force one. Create instances with OtpFieldDefaults.style.

Properties

Link copied to clipboard
Link copied to clipboard

Minimum cell height, never below 48dp.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Minimum cell width, never below 48dp.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int